package work;
import javax.swing.ImageIcon;
public class images {
    public static ImageIcon sea;        //海洋图
    public static ImageIcon battleship; //战舰图
    public static ImageIcon obsersubm;  //侦察潜艇图
    public static ImageIcon torpesubm;  //鱼雷潜艇图
    public static ImageIcon minesubm;   //水雷潜艇图
    public static ImageIcon torpedo;    //鱼雷图
    public static ImageIcon mine;       //水雷图
    public static ImageIcon bomb;       //深水炸弹图

    static { //给静态图片赋值
        sea = new ImageIcon("img/sea.png");
        battleship = new ImageIcon("img/battleship.png");
        obsersubm = new ImageIcon("img/obsersubm.png");
        torpesubm = new ImageIcon("img/torpesubm.png");
        minesubm = new ImageIcon("img/minesubm.png");
        torpedo = new ImageIcon("img/torpedo.png");
        mine = new ImageIcon("img/mine.png");
        bomb = new ImageIcon("img/bomb.png");
    }

    public static void main(String[] args) {
        System.out.println(sea.getImageLoadStatus()); //返回8表示读取正确
        System.out.println(battleship.getImageLoadStatus());
        System.out.println(obsersubm.getImageLoadStatus());
        System.out.println(torpesubm.getImageLoadStatus());
        System.out.println(minesubm.getImageLoadStatus());
        System.out.println(torpedo.getImageLoadStatus());
        System.out.println(mine.getImageLoadStatus());
        System.out.println(bomb.getImageLoadStatus());

    }
}